/**
 * Hunan Jiao Tai Technology Co., Ltd.
 * The code belongs to the company and can not be used in other ways
 * Created by the company's technical personnel.
 * Ownership is the responsibility of the company's technology department.
 **/

package com.shop.common.enums.user;

import lombok.Getter;

import java.io.Serializable;

/**
 * 提现账户类型
 *
 **/
@Getter
public enum ExtractTypeEnum implements Serializable {

    BANK("bank", "银行卡"),
    ALIPAY("alipay", "支付宝"),
    WX("wx", "微信"),
    ;

    private String key;
    private String name;

    ExtractTypeEnum(String key, String name) {
        this.key = key;
        this.name = name;
    }

    public static ExtractTypeEnum val(String key) {
        for (ExtractTypeEnum enumObj : ExtractTypeEnum.values()) {
            if(enumObj.key.equals(key)) {
                return enumObj;
            }
        }
        return null;
    }


}
